import {createRouter,createWebHashHistory} from "vue-router"

const Login =()=>import('../views/Login.vue')
const User =()=>import('../views/User.vue')
const Index =()=>import('../views/index.vue')
const Profile =()=>import('../views/Profile.vue')
const Settings =()=>import('../views/Settings.vue')


const routes=[
    {
        path:'/',
        component:Login
    },
    {
        path:'/login',
        name:'登录界面',
        component:Login,
        
    },
 
    {
        path:'/index',
        name:'用户导航',
        component:Index,
        redirect:'/profile',
        children:[
            {
                path:'/profile',
                name:'用户个人信息',
                component:Profile
            },
            {
                path:'/settings',
                name:'用户修改页',
                component:Settings
            }
        ]
        
    }
]


const router = createRouter({
    history: createWebHashHistory(),
    routes,
})

export default router